package HeSuanServer.POJO;

import cn.hutool.core.date.DateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @描述: 检测人员信息
 * @author: LH
 * @date: 2022/12/5
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserMessage {
    private Integer id;

    private Integer userId;//用户id
    private String uid;//身份证
    private String number;//手机号
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    private Date date;//检测时间
    private String result;//检测结果（0：检测中，1：阴性，2：阳性）
    private String name;//姓名
    private String address;//地址
    private Integer age;//年龄
    private String pickId; //采收集试管
    private Integer empId; //采集人员id
    private String pickStatus; //是否为混合采集（2：混合，1：单人）
    private String DateString;
    public static UserMessage userMessage;
    public static UserMessage Builder(){
        userMessage=new UserMessage();
        return userMessage;
    }
    public static UserMessage id(Integer id){
        userMessage.id=id;
        return userMessage;
    }
    public static UserMessage uid(String uid){
        userMessage.uid=uid;
        return userMessage;
    }
    public static UserMessage date(Date date){
        userMessage.date=date;
        return userMessage;
    }
    public static UserMessage result(String result){
        userMessage.result=result;
        return userMessage;
    }
    public static UserMessage name(String name){
        userMessage.name=name;
        return userMessage;
    }
    public static UserMessage address(String address){
        userMessage.address=address;
        return userMessage;
    }
    public static UserMessage age(Integer age){
        userMessage.age=age;
        return userMessage;
    }
    public static UserMessage empId(Integer empId){
        userMessage.empId=empId;
        return userMessage;
    }
    public static UserMessage pickId(String pickId){
        userMessage.pickId=pickId;
        return userMessage;
    }
    public static UserMessage pickStatus(String pickStatus){
        userMessage.pickStatus=pickStatus;
        return userMessage;
    }
    public static UserMessage DateString(String DateString){
        userMessage.DateString=DateString;
        return userMessage;
    }
    public UserMessage setUser(UserMessage us,User user){
        us.setUid(user.getUid());
        us.setName(user.getName());
        us.setAddress(user.getAddress());
        us.setAge(user.getAge());
        us.setNumber(user.getNumber());
        us.setUserId(user.getId());
        return us;
    }
}
